package com.ruoyi.adapayBalancerecharge.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.adapayBalancerecharge.mapper.AdapayBalancerechargeMapper;
import com.ruoyi.adapayBalancerecharge.domain.AdapayBalancerecharge;
import com.ruoyi.adapayBalancerecharge.service.IAdapayBalancerechargeService;

/**
 * 余额支付充值记录Service业务层处理
 *
 * @author ch
 * @date 2022-03-03
 */
@Service
public class AdapayBalancerechargeServiceImpl implements IAdapayBalancerechargeService
{
    @Autowired
    private AdapayBalancerechargeMapper adapayBalancerechargeMapper;

    /**
     * 查询余额支付充值记录
     *
     * @param id 余额支付充值记录主键
     * @return 余额支付充值记录
     */
    @Override
    public AdapayBalancerecharge selectAdapayBalancerechargeById(Long id)
    {
        return adapayBalancerechargeMapper.selectAdapayBalancerechargeById(id);
    }

    /**
     * 查询余额支付充值记录列表
     *
     * @param adapayBalancerecharge 余额支付充值记录
     * @return 余额支付充值记录
     */
    @Override
    public List<AdapayBalancerecharge> selectAdapayBalancerechargeList(AdapayBalancerecharge adapayBalancerecharge)
    {
        return adapayBalancerechargeMapper.selectAdapayBalancerechargeList(adapayBalancerecharge);
    }

    /**
     * 新增余额支付充值记录
     *
     * @param adapayBalancerecharge 余额支付充值记录
     * @return 结果
     */
    @Override
    public int insertAdapayBalancerecharge(AdapayBalancerecharge adapayBalancerecharge)
    {
        adapayBalancerecharge.setCreateTime(DateUtils.getNowDate());
        return adapayBalancerechargeMapper.insertAdapayBalancerecharge(adapayBalancerecharge);
    }

    /**
     * 修改余额支付充值记录
     *
     * @param adapayBalancerecharge 余额支付充值记录
     * @return 结果
     */
    @Override
    public int updateAdapayBalancerecharge(AdapayBalancerecharge adapayBalancerecharge)
    {
        adapayBalancerecharge.setUpdateTime(DateUtils.getNowDate());
        return adapayBalancerechargeMapper.updateAdapayBalancerecharge(adapayBalancerecharge);
    }

    /**
     * 批量删除余额支付充值记录
     *
     * @param ids 需要删除的余额支付充值记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayBalancerechargeByIds(Long[] ids)
    {
        return adapayBalancerechargeMapper.deleteAdapayBalancerechargeByIds(ids);
    }


    /**
     * 批量逻辑删除余额支付充值记录
     *
     * @param ids 需要删除的余额支付充值记录主键
     * @return 结果
     */
    @Override
    public int logicDeleteAdapayBalancerecharge(Long[] ids,String delType,Long delUser)
    {
        return adapayBalancerechargeMapper.logicDeleteAdapayBalancerecharge(ids,delType,delUser);
    }

    /**
     * 删除余额支付充值记录信息
     *
     * @param id 余额支付充值记录主键
     * @return 结果
     */
    @Override
    public int deleteAdapayBalancerechargeById(Long id)
    {
        return adapayBalancerechargeMapper.deleteAdapayBalancerechargeById(id);
    }
}
